package cn.com.blueInfo.bpm.login.controller;

import cn.com.blueInfo.bpm.login.request.LoginInfoDTO;
import cn.com.blueInfo.bpm.login.service.LoginUserService;
import cn.com.blueInfo.utils.result.ResultInfo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Tag(name = "系统登录 接口")
@Log4j2
@RestController
@RequestMapping("/oauth")
public class LoginUserController {

    @Autowired
    private LoginUserService loginUserService;

    @PostMapping("/login")
    @Operation(summary = "系统登录接口")
    public ResultInfo<Map<String, Object>> login(@RequestBody LoginInfoDTO loginInfoDTO) {
        return loginUserService.loginInfo(loginInfoDTO);
    }

}
